(()=>{"use strict";function e(r){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(r)}function r(r,o){for(var t=0;t
'),n.find(".rbb-close-modal").length||n.children(".rbb-modal-dialog").prepend('
');var a=n.find(".rbb-close-modal");n.children(".rbb-modal-backdrop").length||n.prepend('
'),jQuery("body").children(e).remove(),n.appendTo("body"),n.addClass(t),a.on("click",(function(r){r.preventDefault(),jQuery(this).closest(e).removeClass(t),o.stopPlayer(jQuery(this).closest(e))})),jQuery(".rbb-modal-backdrop").on("click",(function(){jQuery(this).closest(".rbb-modal").removeClass(t),o.stopPlayer(jQuery(this).closest(".rbb-modal"))})),jQuery(document).on("keyup",(function(e){"Escape"===e.key&&jQuery(document).find(".rbb-modal."+t)&&(jQuery(document).find(".rbb-modal."+t).removeClass(t),o.stopPlayer(jQuery(document).find(".rbb-modal."+t)))}))}},{key:"stopPlayer",value:function(e){var r=e.find("iframe");if(r.length)r.attr("src",r.attr("src"));else if(e.find("video")){var o=e.find("video");o.length&&o[0].pause()}}}])&&r(o.prototype,t),n&&r(o,n),Object.defineProperty(o,"prototype",{writable:!1}),e}();window.RisingBambooModal=new o})();